package com.yijiu.wiki.controller;

import com.yijiu.wiki.domain.Demo;
import com.yijiu.wiki.service.DemoService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ligaojian
 * @version 1.0
 * @description: 测试接口 hello world
 * @date 2021/10/30 1:16
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private DemoService demoService;

    public DemoController(DemoService demoService) {
        this.demoService = demoService;
    }

    @GetMapping("/list")
    public List<Demo> list(){
        return demoService.list();
    }
}
